#!/usr/bin/perl
# service.cgi
# start and stop the snmp service

require 'snmp-lib.pl';


&ReadParse();



my $agentline = `ps -A|grep snmpd`;
#print $agentline;
if($agentline)
{
#	$agentline =~ /(\d+)/;
	system("/etc/init.d/snmpd stop");
}
else{
	system("/etc/init.d/snmpd start");
}
#system "snmpd";
&redirect("index.cgi");
